/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.crm.workorder.entity.Answer
   Module Description   :

   Date Created      : 2009/11/20
   Original Author   : andy.chuang
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.crm.cs.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.yaodian100.core.common.entity.CommonEntity;
import com.yaodian100.crm.workorder.entity.WorkOrder;

/**
 * @author andy.chuang
 * 
 */
@Entity
@Table(name = "CRM_CS_ANSWER")
public class Answer extends CommonEntity {

	/**
     * 
     */
	private static final long serialVersionUID = 6163281864351501726L;
	private String id;

	private String title;
	private String content;
	private Boolean showOnProductPage;
	private Question question;
	private Boolean isApproved = true;
	private WorkOrder workOrder;

	/**
	 * @return the workOrder
	 */
	@ManyToOne
	@JoinColumn(name = "WORKORDER_WORK_ORDER_ID")
	public WorkOrder getWorkOrder() {
		return workOrder;
	}

	/**
	 * @param workOrder the workOrder to set
	 */
	public void setWorkOrder(WorkOrder workOrder) {
		this.workOrder = workOrder;
	}

	/**
	 * @return the isApproved
	 */
	public Boolean getIsApproved() {
		return isApproved;
	}

	/**
	 * @param isApproved the isApproved to set
	 */
	public void setIsApproved(Boolean isApproved) {
		this.isApproved = isApproved;
	}

	/**
	 * @return the question
	 */
	@ManyToOne
	public Question getQuestion() {
		return question;
	}

	/**
	 * @param question the question to set
	 */
	public void setQuestion(Question question) {
		this.question = question;
	}

	/**
	 * @return the showOnProductPage
	 */
	public Boolean getShowOnProductPage() {
		return showOnProductPage;
	}

	/**
	 * @param showOnProductPage the showOnProductPage to set
	 */
	public void setShowOnProductPage(Boolean showOnProductPage) {
		this.showOnProductPage = showOnProductPage;
	}

	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(length = 32)
	public String getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the title
	 */
	@Column(length = 500)
	public String getTitle() {
		return title;
	}

	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the content
	 */
	@Column(length = 4000)
	public String getContent() {
		return content;
	}

	/**
	 * @param content the content to set
	 */
	public void setContent(String content) {
		this.content = content;
	}

}
